﻿
--转正申请
CREATE proc [dbo].[proc_Employee_ProbationPassedApply]
(
	@Id int,
	@Eid int,
	@Gradeid int,
	@ZzDate nvarchar(50),
	@Performance text,
	@Belatefor nvarchar(50),
	@EarlyOut nvarchar(50),
	@AskForLeave nvarchar(50),
	@Absenteeism nvarchar(50),
	@Proposer nvarchar(50),
	@IsInsured int,
	@Kbn int

)
as
	if(@Kbn=1)
		begin
			update employee_ProbationPassed set Gradeid=@Gradeid,IsInsured=@IsInsured,ZzDate=@ZzDate,Performance=@Performance,Belatefor=@Belatefor,EarlyOut=@EarlyOut,AskForLeave=@AskForLeave,Absenteeism=@Absenteeism,Proposer=@Proposer,ApplionTime=getdate() where id=@id
		end
	else
		begin
			insert into employee_ProbationPassed(eid,ZzDate,Performance,Belatefor,EarlyOut,AskForLeave,Absenteeism,Proposer,ApplionTime,Gradeid,IsInsured)
			 values(@eid,@ZzDate,@Performance,@Belatefor,@EarlyOut,@AskForLeave,@Absenteeism,@Proposer,getdate(),@Gradeid,@IsInsured)
		end
